const mongoose = require('mongoose');
const { Schema, model } = mongoose;
const userSchema = new Schema({
    __v: {type : Number, select: false},
    account:{type: String,select: false,required: true},//用户账号,通过邮箱注册;
    nickName: {type : String, default:'默认昵称'},//昵称
    password: {type : String, required : true ,select: false},//密码
    headline:{type:String, select : false},//个性签名
    description: {type : String, select : false},//个人简介
    address: {type: String, select : false},//地址
    gender: {type: String,enum: ['男','女','未知'],default : '未知'},//性别
    avatarUrl: {type: String, select : false},//头像路径
});
module.exports = model('User', userSchema);
